package utils

import (
	"bboying_spider/data"
	"fmt"
	"strings"
	"time"
)

// BuildDancerId 构建Dancer ID
func BuildDancerId(nickname string, time time.Time) string {
	nickname = strings.ToLower(strings.Replace(nickname, " ", "_", -1))
	return fmt.Sprintf("%s_%d", nickname, time.UnixMilli())
}

// BuildDancerDetailsId 构建Dancer详情 ID
func BuildDancerDetailsId(dancer data.Dancer, time int64) string {
	nickname := strings.ToLower(strings.Replace(dancer.Nickname, " ", "_", -1))
	return fmt.Sprintf("details_%s_%d", nickname, time)
}

// BuildSpiderBboysSetKey 构建爬虫BBoy列表 Id
func BuildSpiderBboysSetKey() string {
	return "dancer_spider_bboy_set"
}

// BuildSpiderBgirlsSetKey 构建爬虫Bgirl列表 Id
func BuildSpiderBgirlsSetKey() string {
	return "dancer_spider_bgirl_set"
}
